<template>
  <!-- 功能简易配置 -->
  <FunctionSimple ref="el" :record-data="funcBean" />
</template>
<script>
  import { defineComponent, ref } from 'vue';
  import FunctionSimple from '@/components/function-simple/index.vue';
  export default defineComponent({
    name: 'FuncSimple',
    components: { FunctionSimple },
    props: { funcBean: Object },
    setup(props, { expose }) {
      const el = ref();
      // TODO: 暴露doSave方法，用于drawer保存关闭使用，返回Promise，成功关闭
      expose({
        doSave() {
          return el.value?.doSave?.();
        },
      });
      return { el };
    },
  });
</script>
